/*
 * @Author: 肖思汗 
 * @Date: 2019-04-18 13:39:31 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-05-05 13:39:48
 */
//
import * as THREE from "three";
import Mesh, { MeshProps } from "../../Mesh/Mesh";
import cylinderJPG from "./cylinder.jpg";

const geometry = new THREE.CylinderBufferGeometry(0.5, 0.5, 2, 30, 1); // 网格模型


interface CylinderProps extends MeshProps {
}

interface State { }

export default class Cylinder extends Mesh<CylinderProps, State> {
    constructor(props: CylinderProps) {
        super(props);
    }

    // 设置 props 默认值
    static defaultProps = {

        duration: 500, // 默认过渡动画时间

        bezier: [0.8, 0, 0.2, 1], // 默认动画效果

        map: cylinderJPG, // 默认贴图

        color: "#ffffff", // 颜色叠加

        geometry, // 网格模型

        material: "MeshBasicMaterial", // 材质

        clipping: false, // 不使用裁剪

        side: THREE.FrontSide,

        rotation: { x: 0, y: 0, z: 0 }
    };

}



